package cn.zeal4j.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author Administrator
 * @file IntelliJ IDEA Spring-Task
 * @create 2020 09 22 9:58
 */
@Component
public class TaskJob {

    public void job01() {
        System.out.println("任务1" + new Date());
    }

    @Scheduled(cron = "0/5 * * * * ?")
    public void job02() {
        System.out.println("任务2" + new Date());
    }

}
